home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / tlx_sq21.zip / EXIT.SLT < prev    next >
Text File  |  1992-01-13  |  1KB  |  45 lines

  1. //-----------------------------------------------------------
  2. // EXIT.SL? Toggle Auto Exit setting.
  3. //
  4. // This script is executed if you press Alt-X while being online.
  5.  
  6. // Please look at the comments through the whole file, and modify to
  7. // suit your needs, BEFORE you use it. Then recompile with CS EXIT.
  8. //-----------------------------------------------------------
  9.  
  10. // If you have suggestions for improving this script, please suggest
  11. // improvements to me via old-fashioned snail-mail to:
  12.  
  13. //   Inge Vabekk
  14. //   Hamangskogen 108
  15. //   N-1300 SANDVIKA
  16. //   NORWAY                   
  17.  
  18. str exit  [20]
  19.    ,global[]="GLOBAL"
  20.    ,read[]="R"                 // To READ from Global script.
  21.    ,write[]="W"                // To WRITE to Global script.
  22.    ;
  23.  
  24. //-----------------------------------------------------------
  25. // Script starts here.
  26. //-----------------------------------------------------------
  27.  
  28. main()
  29. {
  30.   if (!carrier()) 
  31.     exittelix (0,1);
  32.  
  33.   call (global,read,"EXIT",exit);        // Nothing defined?
  34.  
  35.   if (strposi (exit,"YES",0) >= 0)       // EXIT?
  36.     call (global,write,"EXIT","NO");     // Toggle to NO.
  37.   else
  38.     call (global,write,"EXIT","YES");    // Toggle to YES.
  39.  
  40.   call (global,write,"CHANGE","YES");    // Status changed.
  41.   call ("display");
  42.   return (0);
  43. }
  44.  
  45.